<?php

namespace app\admin\validate;

use think\Validate;

class AuthMember extends Validate {

    /**
     * 规则定义
     * @var array
     */
    protected $rule = [
        'id'       => 'number',
        'page'     => 'number',
        'pageSize' => 'number',
        'username' => 'require|min:3|max:10|alpha',
        'password' => 'min:6|max:32',
    ];

    /**
     * 提示信息定义
     * @var array
     */
    protected $message = [
        'id'       => 'ID类型为正整数',
        'page'     => '分页参数类型为正整数',
        'pageSize' => '每页展示参数为正整数',
        'username' => '请输入3-10位字母组成的用户名',
        'password' => '请输入6-32位字母或数字组成的密码',
    ];

    /**
     * 场景定义
     * @var array
     */
    public $scene = [
        'operateAjax' => ['username', 'password'],
    ];
}